class CreateProductRelations < ActiveRecord::Migration
  def change
    create_table :product_relations, :force => true do |t|
      t.references :product_relation_type
      t.references :relatable, :polymorphic => true
      t.references :related_to, :polymorphic => true
      t.timestamps
    end

    add_index :product_relations, :product_relation_type_id
  end
end